package com.example.leetcode.tree;

import com.example.leetcode.tree.common.TreeNode;
import com.example.leetcode.tree.common.TreeUtils;

import java.util.Arrays;
import java.util.List;


class Solution2236 {
    public boolean checkTree(TreeNode root) {
        return TreeUtils.checkTree(root);
    }
}

/**
 * 103. 二叉树的锯齿形层序遍历
 */
public class leetcode2236 {

    public static void main(String[] args) {

//        Integer[] arrP = {10, 4, 6};
        Integer[] arrP = {5, 3, 1};
//        Integer[] arrP = {};
        List<Integer> nodeListP = Arrays.asList(arrP);
        TreeNode root = TreeUtils.generateAtreeByBFSList(nodeListP);

        Solution2236 solution2236 = new Solution2236();

        System.out.println("题目结果=====================");
        System.out.println(solution2236.checkTree(root));

    }
}
